﻿using MKAdminCore.DTO.CusAttribute;
using MKAdminCore.DTO.Web.Common;
using MKAdminCore.DTO.Web.CusAttribute;
using System;
using System.Collections.Generic;
using System.Text;

namespace MKAdminCore.DTO.Web.BasicSetting
{
    public class GetUserInfoListParameter : PagingParameter
    {
        /// <summary>
        /// 用户名称
        /// </summary>
        public string OperatorName { get; set; }
    }

    public class GetUserInfo
    {
        public int OperatorId { get; set; }
        public string OperatorNo { get; set; }
        public string OperatorName { get; set; }
        public string OperatorPwd { get; set; }
        public int StatusCode { get; set; }
        public string CreateTime { get; set; }
    }

    public class UserInfoAdd
    {
        public int OperatorId { get; set; }
        [CusRequired(ErrorMsg = "请输入登录账号")]
        [CusRegex(RegexContent = "^[0-9a-zA-Z]+$", ErrorMsg = "登录账号只能是字母或数字")]
        public string OperatorNo { get; set; }
        [CusRequired(ErrorMsg = "请输入真实姓名")]
        public string OperatorName { get; set; }
        [CusRequired(ErrorMsg = "请输入登录密码")]
        public string OperatorPwd { get; set; }
        public int StatusCode { get; set; }
        public string CreateTime { get; set; }
    }

    public class UserInfoEdit
    {
        [CusRequired(ErrorMsg = "请先选中用户")]
        public int OperatorId { get; set; }
        public string OperatorNo { get; set; }
        [CusRequired(ErrorMsg = "请输入真实姓名")]
        public string OperatorName { get; set; }
        public string OperatorPwd { get; set; }
        public int StatusCode { get; set; }
        public string CreateTime { get; set; }
    }

    public class UserInfoDel
    {
        [CusRequired(ErrorMsg = "请先选中用户")]
        public int OperatorId { get; set; }
    }

    public class UserInfoUpdateStatus
    {
        [CusRequired(ErrorMsg = "请先选中用户")]
        public int OperatorId { get; set; }
        public int StatusCode { get; set; }
    }

    public class UserInfoGetRoleInfo
    {
        [CusRequired(ErrorMsg = "请先选中用户")]
        public int OperatorId { get; set; }
    }

    public class AllotRoleInfo
    {
        [CusRequired(ErrorMsg = "请先选中用户")]
        public int OperatorId { get; set; }
        public List<int> RoleIds { get; set; }
    }

    public class AllotRoleInfoConfig
    {
        public int OperatorId { get; set; }
        public int RoleId { get; set; }
        public string UpdateTime { get; set; }
    }

    public class UserInfoResetPassword
    {
        [CusRequired(ErrorMsg = "请先选中用户")]
        public int OperatorId { get; set; }
        public string OperatorPwd { get; set; }
        [CusRequired(ErrorMsg = "请输入确认密码")]
        [CusCompare(CompareName = "OperatorPwd", ErrorMsg = "两次密码输入不一致")]
        public string OperatorPwdAgain { get; set; }
    }
}
